package cn.lili.modules.promotion.client;

import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.promotion.entity.dos.Ticket;
import cn.lili.modules.promotion.fallback.TicketFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(path = "${server.servlet.context-path}", name = ServiceConstant.PROMOTION_SERVICE, contextId = "ticket", fallback = TicketFallback.class)
public interface TicketClient {

    /**
     * 获取座位号信息
     *
     * @param areaName 区域名称
     * @param areaDirection    区域方向
     * @param line 行
     * @param column 列
     */
    @GetMapping("/feign/promotion/ticket/getTicket")
    Ticket getTicket(@RequestParam String areaName, @RequestParam String areaDirection,
                     @RequestParam String line, @RequestParam String column);
}
